{
  "cells": [
    {
      "cell_type": "code",
      "source": [
        "!pip install langchain-brightdata langchain-google-genai langgraph langchain-core google-generativeai"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "collapsed": true,
        "id": "oQpkrhUCrHQe",
        "outputId": "b3ca711e-844c-48ab-b7ae-70c83bb10a6d"
      },
      "execution_count": 7,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: langchain-brightdata in /usr/local/lib/python3.11/dist-packages (0.1.3)\n",
            "Collecting langchain-google-genai\n",
            "  Downloading langchain_google_genai-2.1.5-py3-none-any.whl.metadata (5.2 kB)\n",
            "Collecting langgraph\n",
            "  Downloading langgraph-0.4.8-py3-none-any.whl.metadata (6.8 kB)\n",
            "Requirement already satisfied: langchain-core in /usr/local/lib/python3.11/dist-packages (0.3.63)\n",
            "Requirement already satisfied: google-generativeai in /usr/local/lib/python3.11/dist-packages (0.8.5)\n",
            "Requirement already satisfied: pydantic>=2.11.3 in /usr/local/lib/python3.11/dist-packages (from langchain-brightdata) (2.11.5)\n",
            "Requirement already satisfied: requests>=2.32.0 in /usr/local/lib/python3.11/dist-packages (from langchain-brightdata) (2.32.3)\n",
            "Requirement already satisfied: aiohttp>=3.11.0 in /usr/local/lib/python3.11/dist-packages (from langchain-brightdata) (3.11.15)\n",
            "Collecting filetype<2.0.0,>=1.2.0 (from langchain-google-genai)\n",
            "  Downloading filetype-1.2.0-py2.py3-none-any.whl.metadata (6.5 kB)\n",
            "Collecting google-ai-generativelanguage<0.7.0,>=0.6.18 (from langchain-google-genai)\n",
            "  Downloading google_ai_generativelanguage-0.6.18-py3-none-any.whl.metadata (9.8 kB)\n",
            "Collecting langgraph-checkpoint>=2.0.26 (from langgraph)\n",
            "  Downloading langgraph_checkpoint-2.0.26-py3-none-any.whl.metadata (4.6 kB)\n",
            "Collecting langgraph-prebuilt>=0.2.0 (from langgraph)\n",
            "  Downloading langgraph_prebuilt-0.2.2-py3-none-any.whl.metadata (4.5 kB)\n",
            "Collecting langgraph-sdk>=0.1.42 (from langgraph)\n",
            "  Downloading langgraph_sdk-0.1.70-py3-none-any.whl.metadata (1.5 kB)\n",
            "Requirement already satisfied: xxhash>=3.5.0 in /usr/local/lib/python3.11/dist-packages (from langgraph) (3.5.0)\n",
            "Requirement already satisfied: langsmith<0.4,>=0.1.126 in /usr/local/lib/python3.11/dist-packages (from langchain-core) (0.3.44)\n",
            "Requirement already satisfied: tenacity!=8.4.0,<10.0.0,>=8.1.0 in /usr/local/lib/python3.11/dist-packages (from langchain-core) (9.1.2)\n",
            "Requirement already satisfied: jsonpatch<2.0,>=1.33 in /usr/local/lib/python3.11/dist-packages (from langchain-core) (1.33)\n",
            "Requirement already satisfied: PyYAML>=5.3 in /usr/local/lib/python3.11/dist-packages (from langchain-core) (6.0.2)\n",
            "Requirement already satisfied: packaging<25,>=23.2 in /usr/local/lib/python3.11/dist-packages (from langchain-core) (24.2)\n",
            "Requirement already satisfied: typing-extensions>=4.7 in /usr/local/lib/python3.11/dist-packages (from langchain-core) (4.14.0)\n",
            "INFO: pip is looking at multiple versions of google-generativeai to determine which version is compatible with other requirements. This could take a while.\n",
            "Collecting google-generativeai\n",
            "  Downloading google_generativeai-0.8.4-py3-none-any.whl.metadata (4.2 kB)\n",
            "  Downloading google_generativeai-0.8.3-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.8.2-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.8.1-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.8.0-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.7.2-py3-none-any.whl.metadata (4.0 kB)\n",
            "  Downloading google_generativeai-0.7.1-py3-none-any.whl.metadata (3.9 kB)\n",
            "INFO: pip is still looking at multiple versions of google-generativeai to determine which version is compatible with other requirements. This could take a while.\n",
            "  Downloading google_generativeai-0.7.0-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.6.0-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.5.4-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.5.3-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.5.2-py3-none-any.whl.metadata (3.9 kB)\n",
            "INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.\n",
            "  Downloading google_generativeai-0.5.1-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.5.0-py3-none-any.whl.metadata (3.9 kB)\n",
            "  Downloading google_generativeai-0.4.1-py3-none-any.whl.metadata (6.2 kB)\n",
            "  Downloading google_generativeai-0.4.0-py3-none-any.whl.metadata (6.2 kB)\n",
            "  Downloading google_generativeai-0.3.2-py3-none-any.whl.metadata (5.9 kB)\n",
            "  Downloading google_generativeai-0.3.1-py3-none-any.whl.metadata (5.9 kB)\n",
            "  Downloading google_generativeai-0.3.0-py3-none-any.whl.metadata (5.8 kB)\n",
            "  Downloading google_generativeai-0.2.2-py3-none-any.whl.metadata (3.1 kB)\n",
            "  Downloading google_generativeai-0.2.1-py3-none-any.whl.metadata (3.1 kB)\n",
            "  Downloading google_generativeai-0.2.0-py3-none-any.whl.metadata (3.1 kB)\n",
            "  Downloading google_generativeai-0.1.0-py3-none-any.whl.metadata (3.0 kB)\n",
            "Collecting langchain-google-genai\n",
            "  Downloading langchain_google_genai-2.1.4-py3-none-any.whl.metadata (5.2 kB)\n",
            "  Downloading langchain_google_genai-2.1.3-py3-none-any.whl.metadata (4.7 kB)\n",
            "  Downloading langchain_google_genai-2.1.2-py3-none-any.whl.metadata (4.7 kB)\n",
            "  Downloading langchain_google_genai-2.1.1-py3-none-any.whl.metadata (4.7 kB)\n",
            "  Downloading langchain_google_genai-2.1.0-py3-none-any.whl.metadata (3.6 kB)\n",
            "  Downloading langchain_google_genai-2.0.11-py3-none-any.whl.metadata (3.6 kB)\n",
            "  Downloading langchain_google_genai-2.0.10-py3-none-any.whl.metadata (3.6 kB)\n",
            "Requirement already satisfied: google-ai-generativelanguage==0.6.15 in /usr/local/lib/python3.11/dist-packages (from google-generativeai) (0.6.15)\n",
            "Requirement already satisfied: google-api-core in /usr/local/lib/python3.11/dist-packages (from google-generativeai) (2.25.0)\n",
            "Requirement already satisfied: google-api-python-client in /usr/local/lib/python3.11/dist-packages (from google-generativeai) (2.171.0)\n",
            "Requirement already satisfied: google-auth>=2.15.0 in /usr/local/lib/python3.11/dist-packages (from google-generativeai) (2.38.0)\n",
            "Requirement already satisfied: protobuf in /usr/local/lib/python3.11/dist-packages (from google-generativeai) (5.29.5)\n",
            "Requirement already satisfied: tqdm in /usr/local/lib/python3.11/dist-packages (from google-generativeai) (4.67.1)\n",
            "Requirement already satisfied: proto-plus<2.0.0dev,>=1.22.3 in /usr/local/lib/python3.11/dist-packages (from google-ai-generativelanguage==0.6.15->google-generativeai) (1.26.1)\n",
            "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp>=3.11.0->langchain-brightdata) (2.6.1)\n",
            "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/dist-packages (from aiohttp>=3.11.0->langchain-brightdata) (1.3.2)\n",
            "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp>=3.11.0->langchain-brightdata) (25.3.0)\n",
            "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/dist-packages (from aiohttp>=3.11.0->langchain-brightdata) (1.6.0)\n",
            "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/dist-packages (from aiohttp>=3.11.0->langchain-brightdata) (6.4.4)\n",
            "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp>=3.11.0->langchain-brightdata) (0.3.1)\n",
            "Requirement already satisfied: yarl<2.0,>=1.17.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp>=3.11.0->langchain-brightdata) (1.20.0)\n",
            "Requirement already satisfied: googleapis-common-protos<2.0.0,>=1.56.2 in /usr/local/lib/python3.11/dist-packages (from google-api-core->google-generativeai) (1.70.0)\n",
            "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.11/dist-packages (from google-auth>=2.15.0->google-generativeai) (5.5.2)\n",
            "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.11/dist-packages (from google-auth>=2.15.0->google-generativeai) (0.4.2)\n",
            "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.11/dist-packages (from google-auth>=2.15.0->google-generativeai) (4.9.1)\n",
            "Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.11/dist-packages (from jsonpatch<2.0,>=1.33->langchain-core) (3.0.0)\n",
            "Collecting ormsgpack<2.0.0,>=1.8.0 (from langgraph-checkpoint>=2.0.26->langgraph)\n",
            "  Downloading ormsgpack-1.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (43 kB)\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m43.7/43.7 kB\u001b[0m \u001b[31m2.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hRequirement already satisfied: httpx>=0.25.2 in /usr/local/lib/python3.11/dist-packages (from langgraph-sdk>=0.1.42->langgraph) (0.28.1)\n",
            "Requirement already satisfied: orjson>=3.10.1 in /usr/local/lib/python3.11/dist-packages (from langgraph-sdk>=0.1.42->langgraph) (3.10.18)\n",
            "Requirement already satisfied: requests-toolbelt<2.0.0,>=1.0.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.126->langchain-core) (1.0.0)\n",
            "Requirement already satisfied: zstandard<0.24.0,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.126->langchain-core) (0.23.0)\n",
            "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic>=2.11.3->langchain-brightdata) (0.7.0)\n",
            "Requirement already satisfied: pydantic-core==2.33.2 in /usr/local/lib/python3.11/dist-packages (from pydantic>=2.11.3->langchain-brightdata) (2.33.2)\n",
            "Requirement already satisfied: typing-inspection>=0.4.0 in /usr/local/lib/python3.11/dist-packages (from pydantic>=2.11.3->langchain-brightdata) (0.4.1)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.0->langchain-brightdata) (3.4.2)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.0->langchain-brightdata) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.0->langchain-brightdata) (2.4.0)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.0->langchain-brightdata) (2025.4.26)\n",
            "Requirement already satisfied: httplib2<1.0.0,>=0.19.0 in /usr/local/lib/python3.11/dist-packages (from google-api-python-client->google-generativeai) (0.22.0)\n",
            "Requirement already satisfied: google-auth-httplib2<1.0.0,>=0.2.0 in /usr/local/lib/python3.11/dist-packages (from google-api-python-client->google-generativeai) (0.2.0)\n",
            "Requirement already satisfied: uritemplate<5,>=3.0.1 in /usr/local/lib/python3.11/dist-packages (from google-api-python-client->google-generativeai) (4.2.0)\n",
            "Requirement already satisfied: grpcio<2.0.0,>=1.33.2 in /usr/local/lib/python3.11/dist-packages (from google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.1->google-ai-generativelanguage==0.6.15->google-generativeai) (1.72.1)\n",
            "Requirement already satisfied: grpcio-status<2.0.0,>=1.33.2 in /usr/local/lib/python3.11/dist-packages (from google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.1->google-ai-generativelanguage==0.6.15->google-generativeai) (1.71.0)\n",
            "Requirement already satisfied: pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2 in /usr/local/lib/python3.11/dist-packages (from httplib2<1.0.0,>=0.19.0->google-api-python-client->google-generativeai) (3.2.3)\n",
            "Requirement already satisfied: anyio in /usr/local/lib/python3.11/dist-packages (from httpx>=0.25.2->langgraph-sdk>=0.1.42->langgraph) (4.9.0)\n",
            "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/dist-packages (from httpx>=0.25.2->langgraph-sdk>=0.1.42->langgraph) (1.0.9)\n",
            "Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.11/dist-packages (from httpcore==1.*->httpx>=0.25.2->langgraph-sdk>=0.1.42->langgraph) (0.16.0)\n",
            "Requirement already satisfied: pyasn1<0.7.0,>=0.6.1 in /usr/local/lib/python3.11/dist-packages (from pyasn1-modules>=0.2.1->google-auth>=2.15.0->google-generativeai) (0.6.1)\n",
            "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.11/dist-packages (from anyio->httpx>=0.25.2->langgraph-sdk>=0.1.42->langgraph) (1.3.1)\n",
            "Downloading langchain_google_genai-2.0.10-py3-none-any.whl (41 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m42.0/42.0 kB\u001b[0m \u001b[31m4.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading langgraph-0.4.8-py3-none-any.whl (152 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m152.4/152.4 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading filetype-1.2.0-py2.py3-none-any.whl (19 kB)\n",
            "Downloading langgraph_checkpoint-2.0.26-py3-none-any.whl (44 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.2/44.2 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading langgraph_prebuilt-0.2.2-py3-none-any.whl (23 kB)\n",
            "Downloading langgraph_sdk-0.1.70-py3-none-any.whl (49 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.0/50.0 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading ormsgpack-1.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (216 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m216.5/216.5 kB\u001b[0m \u001b[31m21.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hInstalling collected packages: filetype, ormsgpack, langgraph-sdk, langgraph-checkpoint, langgraph-prebuilt, langgraph, langchain-google-genai\n",
            "Successfully installed filetype-1.2.0 langchain-google-genai-2.0.10 langgraph-0.4.8 langgraph-checkpoint-2.0.26 langgraph-prebuilt-0.2.2 langgraph-sdk-0.1.70 ormsgpack-1.10.0\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "import os\n",
        "import json\n",
        "from typing import Dict, Any, Optional\n",
        "from langchain_brightdata import BrightDataWebScraperAPI\n",
        "from langchain_google_genai import ChatGoogleGenerativeAI\n",
        "from langgraph.prebuilt import create_react_agent"
      ],
      "metadata": {
        "id": "OGpdyeWrr75E"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "class BrightDataScraper:\n",
        "    \"\"\"Enhanced web scraper using BrightData API\"\"\"\n",
        "\n",
        "    def __init__(self, api_key: str, google_api_key: Optional[str] = None):\n",
        "        \"\"\"Initialize scraper with API keys\"\"\"\n",
        "        self.api_key = api_key\n",
        "        self.scraper = BrightDataWebScraperAPI(bright_data_api_key=api_key)\n",
        "\n",
        "        if google_api_key:\n",
        "            self.llm = ChatGoogleGenerativeAI(\n",
        "                model=\"gemini-2.0-flash\",\n",
        "                google_api_key=google_api_key\n",
        "            )\n",
        "            self.agent = create_react_agent(self.llm, [self.scraper])\n",
        "\n",
        "    def scrape_amazon_product(self, url: str, zipcode: str = \"10001\") -> Dict[str, Any]:\n",
        "        \"\"\"Scrape Amazon product data\"\"\"\n",
        "        try:\n",
        "            results = self.scraper.invoke({\n",
        "                \"url\": url,\n",
        "                \"dataset_type\": \"amazon_product\",\n",
        "                \"zipcode\": zipcode\n",
        "            })\n",
        "            return {\"success\": True, \"data\": results}\n",
        "        except Exception as e:\n",
        "            return {\"success\": False, \"error\": str(e)}\n",
        "\n",
        "    def scrape_amazon_bestsellers(self, region: str = \"in\") -> Dict[str, Any]:\n",
        "        \"\"\"Scrape Amazon bestsellers\"\"\"\n",
        "        try:\n",
        "            url = f\"https://www.amazon.{region}/gp/bestsellers/\"\n",
        "            results = self.scraper.invoke({\n",
        "                \"url\": url,\n",
        "                \"dataset_type\": \"amazon_product\"\n",
        "            })\n",
        "            return {\"success\": True, \"data\": results}\n",
        "        except Exception as e:\n",
        "            return {\"success\": False, \"error\": str(e)}\n",
        "\n",
        "    def scrape_linkedin_profile(self, url: str) -> Dict[str, Any]:\n",
        "        \"\"\"Scrape LinkedIn profile data\"\"\"\n",
        "        try:\n",
        "            results = self.scraper.invoke({\n",
        "                \"url\": url,\n",
        "                \"dataset_type\": \"linkedin_person_profile\"\n",
        "            })\n",
        "            return {\"success\": True, \"data\": results}\n",
        "        except Exception as e:\n",
        "            return {\"success\": False, \"error\": str(e)}\n",
        "\n",
        "    def run_agent_query(self, query: str) -> None:\n",
        "        \"\"\"Run AI agent with natural language query\"\"\"\n",
        "        if not hasattr(self, 'agent'):\n",
        "            print(\"Error: Google API key required for agent functionality\")\n",
        "            return\n",
        "\n",
        "        try:\n",
        "            for step in self.agent.stream(\n",
        "                {\"messages\": query},\n",
        "                stream_mode=\"values\"\n",
        "            ):\n",
        "                step[\"messages\"][-1].pretty_print()\n",
        "        except Exception as e:\n",
        "            print(f\"Agent error: {e}\")\n",
        "\n",
        "    def print_results(self, results: Dict[str, Any], title: str = \"Results\") -> None:\n",
        "        \"\"\"Pretty print results\"\"\"\n",
        "        print(f\"\\n{'='*50}\")\n",
        "        print(f\"{title}\")\n",
        "        print(f\"{'='*50}\")\n",
        "\n",
        "        if results[\"success\"]:\n",
        "            print(json.dumps(results[\"data\"], indent=2, ensure_ascii=False))\n",
        "        else:\n",
        "            print(f\"Error: {results['error']}\")\n",
        "        print()"
      ],
      "metadata": {
        "id": "-OuD5_vGr8Sc"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "def main():\n",
        "    \"\"\"Main execution function\"\"\"\n",
        "    BRIGHT_DATA_API_KEY = \"Use Your Own API Key\"\n",
        "    GOOGLE_API_KEY = \"Use Your Own API Key\"\n",
        "\n",
        "    scraper = BrightDataScraper(BRIGHT_DATA_API_KEY, GOOGLE_API_KEY)\n",
        "\n",
        "    print(\"🛍️ Scraping Amazon India Bestsellers...\")\n",
        "    bestsellers = scraper.scrape_amazon_bestsellers(\"in\")\n",
        "    scraper.print_results(bestsellers, \"Amazon India Bestsellers\")\n",
        "\n",
        "    print(\"📦 Scraping Amazon Product...\")\n",
        "    product_url = \"https://www.amazon.com/dp/B08L5TNJHG\"\n",
        "    product_data = scraper.scrape_amazon_product(product_url, \"10001\")\n",
        "    scraper.print_results(product_data, \"Amazon Product Data\")\n",
        "\n",
        "    print(\"👤 Scraping LinkedIn Profile...\")\n",
        "    linkedin_url = \"https://www.linkedin.com/in/satyanadella/\"\n",
        "    linkedin_data = scraper.scrape_linkedin_profile(linkedin_url)\n",
        "    scraper.print_results(linkedin_data, \"LinkedIn Profile Data\")\n",
        "\n",
        "    print(\"🤖 Running AI Agent Query...\")\n",
        "    agent_query = \"\"\"\n",
        "    Scrape Amazon product data for https://www.amazon.com/dp/B0D2Q9397Y?th=1\n",
        "    in New York (zipcode 10001) and summarize the key product details.\n",
        "    \"\"\"\n",
        "    scraper.run_agent_query(agent_query)"
      ],
      "metadata": {
        "id": "5VjLWy9EsBVc"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "if __name__ == \"__main__\":\n",
        "    print(\"Installing required packages...\")\n",
        "    os.system(\"pip install -q langchain-brightdata langchain-google-genai langgraph\")\n",
        "\n",
        "    os.environ[\"BRIGHT_DATA_API_KEY\"] = \"Use Your Own API Key\"\n",
        "\n",
        "    main()"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "oNhmtoXKrHl2",
        "outputId": "f845b4fd-15e7-4de1-9900-66ef116d2277"
      },
      "execution_count": 8,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Installing required packages...\n",
            "🛍️ Scraping Amazon India Bestsellers...\n",
            "\n",
            "==================================================\n",
            "Amazon India Bestsellers\n",
            "==================================================\n",
            "\"Error extracting data from https://www.amazon.in/gp/bestsellers/: Error 202: {\\\"snapshot_id\\\":\\\"s_mbtsi1fd1mlrbvayq9\\\",\\\"message\\\":\\\"Your request is still in progress and cannot be retrieved in this call. Use the provided Snapshot ID to track progress via the Monitor Snapshot endpoint and download it once ready via the Download Snapshot endpoint\\\"}\"\n",
            "\n",
            "📦 Scraping Amazon Product...\n",
            "\n",
            "==================================================\n",
            "Amazon Product Data\n",
            "==================================================\n",
            "{\n",
            "  \"input\": {\n",
            "    \"url\": \"https://www.amazon.com/dp/B08L5TNJHG\",\n",
            "    \"zipcode\": \"10001\",\n",
            "    \"asin\": \"\",\n",
            "    \"language\": \"\"\n",
            "  },\n",
            "  \"warning\": \"The navigation resulted in a dead page (404 status code)\",\n",
            "  \"warning_code\": \"dead_page\"\n",
            "}\n",
            "\n",
            "👤 Scraping LinkedIn Profile...\n",
            "\n",
            "==================================================\n",
            "LinkedIn Profile Data\n",
            "==================================================\n",
            "{\n",
            "  \"id\": \"satyanadella\",\n",
            "  \"name\": \"Satya Nadella\",\n",
            "  \"city\": \"Redmond, Washington, United States\",\n",
            "  \"country_code\": \"US\",\n",
            "  \"position\": \"Chairman and CEO at Microsoft\",\n",
            "  \"about\": \"As chairman and CEO of Microsoft, I define my mission and that of my company as empowering every person and every organization on the planet to achieve more.\",\n",
            "  \"current_company\": {\n",
            "    \"name\": \"Microsoft\",\n",
            "    \"company_id\": \"microsoft\",\n",
            "    \"title\": \"Chairman and CEO\",\n",
            "    \"location\": \"Greater Seattle Area\"\n",
            "  },\n",
            "  \"experience\": [\n",
            "    {\n",
            "      \"title\": \"Chairman and CEO\",\n",
            "      \"location\": \"Greater Seattle Area\",\n",
            "      \"description_html\": null,\n",
            "      \"start_date\": \"Feb 2014\",\n",
            "      \"end_date\": \"Present\",\n",
            "      \"company\": \"Microsoft\",\n",
            "      \"company_id\": \"microsoft\",\n",
            "      \"url\": \"https://www.linkedin.com/company/microsoft\",\n",
            "      \"company_logo_url\": \"https://media.licdn.com/dms/image/v2/D560BAQH32RJQCl3dDQ/company-logo_100_100/B56ZYQ0mrGGoAU-/0/1744038948046/microsoft_logo?e=2147483647&v=beta&t=rr_7_bFRKp6umQxIHErPOZHtR8dMPIYeTjlKFdotJBY\"\n",
            "    },\n",
            "    {\n",
            "      \"title\": \"Member Board Of Trustees\",\n",
            "      \"description_html\": null,\n",
            "      \"start_date\": \"2018\",\n",
            "      \"end_date\": \"Present\",\n",
            "      \"company\": \"University of Chicago\",\n",
            "      \"url\": \"https://www.linkedin.com/school/uchicago/\",\n",
            "      \"company_logo_url\": \"https://media.licdn.com/dms/image/v2/C4D0BAQHbp_dv8CAlpQ/company-logo_100_100/company-logo_100_100/0/1630577480920/uchicago_logo?e=2147483647&v=beta&t=cAtlujPg_gTYAJEyaRAqq_mGt_-UR02Z7OGx9bpFBFI\"\n",
            "    },\n",
            "    {\n",
            "      \"title\": \"Board Member\",\n",
            "      \"description_html\": null,\n",
            "      \"start_date\": \"2017\",\n",
            "      \"end_date\": \"2024\",\n",
            "      \"company\": \"Starbucks\",\n",
            "      \"company_id\": \"starbucks\",\n",
            "      \"url\": \"https://www.linkedin.com/company/starbucks\",\n",
            "      \"company_logo_url\": \"https://media.licdn.com/dms/image/v2/C4D0BAQEQxk9y2rk7Hw/company-logo_100_100/company-logo_100_100/0/1631316692276?e=2147483647&v=beta&t=itdoVXP3gnqtQ7Grar4B3YoPyw-Ors9bKMZlZpb0QcY\"\n",
            "    },\n",
            "    {\n",
            "      \"title\": \"Chairman\",\n",
            "      \"description_html\": null,\n",
            "      \"start_date\": \"2021\",\n",
            "      \"end_date\": \"2023\",\n",
            "      \"company\": \"The Business Council U.S.\",\n",
            "      \"company_id\": \"the-business-council-us\",\n",
            "      \"url\": \"https://www.linkedin.com/company/the-business-council-us\",\n",
            "      \"company_logo_url\": \"https://media.licdn.com/dms/image/v2/C4D0BAQGcnaZNpjMvrw/company-logo_100_100/company-logo_100_100/0/1630557702704/the_business_council_us_logo?e=2147483647&v=beta&t=jMVaJBszh2OAHju51Wxo8lkraUvPnQW9PTJ_o1XTus0\"\n",
            "    },\n",
            "    {\n",
            "      \"title\": \"Board Member\",\n",
            "      \"description_html\": null,\n",
            "      \"start_date\": \"2016\",\n",
            "      \"end_date\": \"2022\",\n",
            "      \"company\": \"Fred Hutch\",\n",
            "      \"company_id\": \"fredhutch\",\n",
            "      \"url\": \"https://www.linkedin.com/company/fredhutch\",\n",
            "      \"company_logo_url\": \"https://media.licdn.com/dms/image/v2/D4D0BAQGF4eOou62nvQ/company-logo_100_100/company-logo_100_100/0/1664795263764/fredhutch_logo?e=2147483647&v=beta&t=vZYRCTo_jFF7soE3B-ivjfAjlkEjW8nXSsukKDK2Obg\"\n",
            "    }\n",
            "  ],\n",
            "  \"url\": \"https://www.linkedin.com/in/satyanadella/\",\n",
            "  \"people_also_viewed\": [\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/tony-bates-679227a5?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Tony Bates\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"San Francisco Bay Area\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/charlesphillips1?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Charles Phillips\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"New York, NY\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/neilbarua?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Neil Barua\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"United States\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/jackmulloy?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Jack Mulloy\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"Greater Cleveland\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/rickfaulk?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Rick Faulk\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"Greater Boston\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/toufisaliba?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Toufi Saliba\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"San Francisco, CA\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/dpandey?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Dheeraj Pandey\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"Los Gatos, CA\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/ralphdangelmaier?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Ralph Dangelmaier\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"Waltham, MA\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/linda-findley?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Linda Findley\",\n",
            "      \"about\": \"Global Consumer/Consumer Tech CEO ✦Ex Blue Apron, Etsy & Alibaba ✦P&Ls up to $3.2B ✦Driving Business Transformation & Scale ✦Board Director at Ralph Lauren & Styleseat\",\n",
            "      \"location\": \"New York, NY\"\n",
            "    },\n",
            "    {\n",
            "      \"profile_link\": \"https://www.linkedin.com/in/mjones?trk=public_profile_browsemap-profile\",\n",
            "      \"name\": \"Michael Jones\",\n",
            "      \"about\": null,\n",
            "      \"location\": \"Aspen, CO\"\n",
            "    }\n",
            "  ],\n",
            "  \"educations_details\": \"The University of Chicago Booth School of Business\",\n",
            "  \"education\": [\n",
            "    {\n",
            "      \"title\": \"The University of Chicago Booth School of Business\",\n",
            "      \"url\": \"https://www.linkedin.com/school/universityofchicagoboothschoolofbusiness/?trk=public_profile_school_profile-section-card_image-click\",\n",
            "      \"start_year\": \"1994\",\n",
            "      \"end_year\": \"1996\",\n",
            "      \"description\": null,\n",
            "      \"description_html\": null,\n",
            "      \"institute_logo_url\": \"https://media.licdn.com/dms/image/v2/D560BAQFZO05jhYKSkw/company-logo_100_100/company-logo_100_100/0/1692627816910/universityofchicagoboothschoolofbusiness_logo?e=2147483647&v=beta&t=37ZvcegiFfRvQpXUnki5vv_2IaJ2d3Dk_jW4DGhPc0k\"\n",
            "    },\n",
            "    {\n",
            "      \"title\": \"Manipal Institute of Technology, Manipal\",\n",
            "      \"degree\": \"Bachelor’s Degree\",\n",
            "      \"field\": \"Electrical Engineering\",\n",
            "      \"url\": \"https://in.linkedin.com/school/manipal-institute-of-technology/?trk=public_profile_school_profile-section-card_image-click\",\n",
            "      \"description\": null,\n",
            "      \"description_html\": null,\n",
            "      \"institute_logo_url\": \"https://media.licdn.com/dms/image/v2/C510BAQH66KkTTZFJ2A/company-logo_100_100/company-logo_100_100/0/1630615963889/manipal_institute_of_technology_logo?e=2147483647&v=beta&t=icff0bWM7ff9bvPGIYo_TqKGTlWqRkNxC6vI_PqOzZo\"\n",
            "    },\n",
            "    {\n",
            "      \"title\": \"University of Wisconsin-Milwaukee\",\n",
            "      \"degree\": \"Master’s Degree\",\n",
            "      \"field\": \"Computer Science\",\n",
            "      \"url\": \"https://www.linkedin.com/school/uwmilwaukee/?trk=public_profile_school_profile-section-card_image-click\",\n",
            "      \"description\": null,\n",
            "      \"description_html\": null,\n",
            "      \"institute_logo_url\": \"https://media.licdn.com/dms/image/v2/D4D0BAQE47QlO_LG8SQ/company-logo_100_100/company-logo_100_100/0/1729615751602/uwmilwaukee_logo?e=2147483647&v=beta&t=az_WMUpjgtzqCDEHNPBwdRJzq3qHD4dyWy6KQJtDpm0\"\n",
            "    }\n",
            "  ],\n",
            "  \"avatar\": \"https://media.licdn.com/dms/image/v2/C5603AQHHUuOSlRVA1w/profile-displayphoto-shrink_200_200/profile-displayphoto-shrink_200_200/0/1579726625398?e=2147483647&v=beta&t=Rr7WT9uBM0byOij0oT_KirejIMVE4HK4r8NGIp0zjdI\",\n",
            "  \"followers\": 11395198,\n",
            "  \"connections\": 500,\n",
            "  \"current_company_company_id\": \"microsoft\",\n",
            "  \"current_company_name\": \"Microsoft\",\n",
            "  \"location\": \"Redmond\",\n",
            "  \"input_url\": \"https://www.linkedin.com/in/satyanadella/\",\n",
            "  \"linkedin_id\": \"satyanadella\",\n",
            "  \"activity\": [\n",
            "    {\n",
            "      \"interaction\": \"Shared by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satyanadella_barclays-to-roll-out-microsoft-365-copilot-activity-7337838600249581568-C_fg\",\n",
            "      \"title\": \"Barclays is scaling Microsoft 365 Copilot to 100,000 employees, putting AI in every employee’s hands. This will simplify how they access…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/sync/v2/D5627AQGFAQ2HI3i1og/articleshare-shrink_1280_800/B56ZdTE4WzHUAQ-/0/1749445478867?e=2147483647&v=beta&t=XlJbHKUtFwQiIcqzBf2a5xauorVG-PObAhKx2tOsv6Y\",\n",
            "      \"id\": \"365\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Shared by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satyanadella_xbox-games-showcase-2025-everything-announced-activity-7337566144272244737-Xblc\",\n",
            "      \"title\": \"New games. New hardware. And new ways to play. As Xbox turns 25 next year, the future of gaming is just getting started.\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/sync/v2/D4E27AQFSnfL-zQqDxQ/articleshare-shrink_800/B4EZdQxLhGHcAI-/0/1749406759252?e=2147483647&v=beta&t=tKIYE56Z79KsfMWouiv2O11hjNSJeyr5jwR30gkxa3k\",\n",
            "      \"id\": \"2025\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Liked by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/jpcourtois_reflection-orcasisland-fourwindscamp-activity-7335269639976882179-TMWF\",\n",
            "      \"title\": \"Returning to the Seattle area is always special, reconnecting me with places that hold deeply cherished memories from our family’s years here in the…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D4E22AQGXP1PO9lppKQ/feedshare-shrink_800/B4EZcwc3FwHYAk-/0/1748864563436?e=2147483647&v=beta&t=YiyrdyzPxPeWn_dLoErIAQqqOE10xsW69bMcYGBo8QM\",\n",
            "      \"id\": \"7335269639976882179\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Liked by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/yusufmehdi_with-a-simple-%F0%9D%97%9B%F0%9D%97%B2%F0%9D%98%86-%F0%9D%97%96%F0%9D%97%BC%F0%9D%97%BD%F0%9D%97%B6%F0%9D%97%B9%F0%9D%97%BC%F0%9D%98%81-youll-activity-7328490438519074816-C146\",\n",
            "      \"title\": \"With a simple “𝗛𝗲𝘆, 𝗖𝗼𝗽𝗶𝗹𝗼𝘁!” you'll soon be able to start a conversation with Copilot Voice and stay in your flow when you need answers to…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D5605AQHtDOn-Bc-dzQ/videocover-high/B56ZbQHBnaG4Bw-/0/1747248261997?e=2147483647&v=beta&t=nDlh9-1lELGRI1nPX55KppiZi0ahxU8zY2NNdq1b-Ic\",\n",
            "      \"id\": \"7328490438519074816\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Liked by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/rowancheung_microsoft-just-revealed-its-next-big-ai-bets-activity-7330993977401249795-KzTG\",\n",
            "      \"title\": \"Microsoft just revealed its next big AI bets at Build 2025. I sat down with Microsoft CEO Satya Nadella to unpack: -Microsoft’s vision for the…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D4E05AQHISCgLbBnCPA/videocover-high/B4EZbzsA6XHABs-/0/1747845156524?e=2147483647&v=beta&t=ErTKZTKCLTQ2PKDcYF9R68rpBIDnqwlDt-QM-DFBzIo\",\n",
            "      \"id\": \"7330993977401249795\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Shared by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satyanadella_microsofts-aurora-ai-foundation-model-goes-activity-7330987211561058307-01m1\",\n",
            "      \"title\": \"Aurora is a new foundation model from Microsoft Research that goes beyond weather forecasting, delivering faster, more accurate predictions of…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/sync/v2/D4E27AQECarXwPvKehg/articleshare-shrink_800/B4EZbzYIHLHcAI-/0/1747839910719?e=2147483647&v=beta&t=UkA_6ZlUnBTWjA7ukFRZQIS9vVI80sg5DbazcfPjCuk\",\n",
            "      \"id\": \"7330987211561058307\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Liked by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satishthomas_microsoft-dynamics365-ai-activity-7330609790370435074-9v_N\",\n",
            "      \"title\": \"I’m excited to announce the launch of new MCP servers for Microsoft Dynamics 365 ERP and CRM at MSBuild. We’re defining the next frontier of business…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D5605AQF2qXJ9tIJGTw/videocover-high/B56ZbuOLMoH4B0-/0/1747753538043?e=2147483647&v=beta&t=VBYsBmp-WQ3oaHSxi06XJZRsZaGJAvyyHBPS1oIhaOg\",\n",
            "      \"id\": \"7330609790370435074\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Shared by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satyanadella_the-agentic-web-is-reshaping-the-entire-tech-activity-7330468385492807680-D52Z\",\n",
            "      \"title\": \"The agentic web is reshaping the entire tech stack, and we are creating new opportunity for devs at every layer. You can watch my full Build keynote…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D4D05AQHddZkesXcJxA/videocover-high/B4DZbsN.OiG0Bs-/0/1747719847184?e=2147483647&v=beta&t=_15pW8igFiF0TfOligWXWcaUEgCu0bHSgY5WZfJDW18\",\n",
            "      \"id\": \"7330468385492807680\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Liked by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/microsoft_weve-been-talking-about-someday-wed-get-activity-7330281456172171264-NGTT\",\n",
            "      \"title\": \"“We’ve been talking about someday we’d get to a real agentic coding experience, and it’s kind of wild to me that it’s finally here.” – Sam Altman…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D5610AQHRJtCzcLDdiw/image-shrink_800/B56ZbpkHyzH4Ac-/0/1747675283415?e=2147483647&v=beta&t=-x9uojdK8RCzfQSNGmIRp91bYJA2Wt0Mi1AnhQ4vB9g\",\n",
            "      \"id\": \"7330281456172171264\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Shared by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satyanadella_thanks-for-joining-us-at-build-sam-great-activity-7330355298693459970-OgEX\",\n",
            "      \"title\": \"Thanks for joining us at Build, Sam! Great to talk to you about SWE agents and how the role of developers is evolving.\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D5605AQG7uLRIzfrz1g/videocover-high/B56Zbqmbt0HUBs-/0/1747692853961?e=2147483647&v=beta&t=NNx4LEXPLMAJTr9UQ6PxUPOrLoOi30ZsgriUZxgGHlI\",\n",
            "      \"id\": \"7330355298693459970\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Shared by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satyanadella_great-to-have-jensen-huang-at-build-to-talk-activity-7330337494405668864-sOQF\",\n",
            "      \"title\": \"Great to have Jensen Huang at Build to talk about our partnership and how we are building and scaling the largest AI supercomputer in the world on…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D5605AQEr-jDDDQUZQQ/videocover-high/B56ZbqWilEHgBs-/0/1747688634020?e=2147483647&v=beta&t=sri5dvYlJV2-Lg2JdkBtppgAMl3P98h69bWc4XtSByo\",\n",
            "      \"id\": \"7330337494405668864\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Shared by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satyanadella_stanford-medicine-is-orchestrating-multiple-activity-7330315981329694720-ZFGp\",\n",
            "      \"title\": \"Stanford Medicine is orchestrating multiple agents to connect medical data, clinical trials, and more – all with the goal of delivering more…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D5605AQH9ahSWQkX3mQ/videocover-high/B56ZbqDJiQGsB4-/0/1747683504670?e=2147483647&v=beta&t=quAei92fEvlew60simvap3NJQe-AS_3z6mcd2VKuIYE\",\n",
            "      \"id\": \"7330315981329694720\"\n",
            "    },\n",
            "    {\n",
            "      \"interaction\": \"Shared by Satya Nadella\",\n",
            "      \"link\": \"https://www.linkedin.com/posts/satyanadella_today-at-microsoft-build-we-showed-you-how-activity-7330296202275495938-EWFD\",\n",
            "      \"title\": \"Today, at Microsoft Build we showed you how we are building the open agentic web. It is reshaping every layer of the stack, and our goal is simple:…\",\n",
            "      \"img\": \"https://media.licdn.com/dms/image/v2/D5605AQGr6bV7Jcwmjg/videocover-high/B56ZbpxdHlGgB0-/0/1747678795025?e=2147483647&v=beta&t=Py360J1Sr8Z_VsN7NzuD74JltL6gtoLjvaYUlkF8H-Y\",\n",
            "      \"id\": \"7330296202275495938\"\n",
            "    }\n",
            "  ],\n",
            "  \"linkedin_num_id\": \"19186432\",\n",
            "  \"banner_image\": \"https://media.licdn.com/dms/image/v2/C5616AQHEITsxuRUzWw/profile-displaybackgroundimage-shrink_200_800/profile-displaybackgroundimage-shrink_200_800/0/1553288711074?e=2147483647&v=beta&t=JJFiRHXh-I-f2twPrJA1e44JFq5g6YhjM9KbHL_vTqY\",\n",
            "  \"honors_and_awards\": null,\n",
            "  \"similar_profiles\": [\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/tony-bates-679227a5\",\n",
            "      \"name\": \"Tony Bates\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/tony-bates-679227a5\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/charlesphillips1\",\n",
            "      \"name\": \"Charles Phillips\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/charlesphillips1\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/neilbarua\",\n",
            "      \"name\": \"Neil Barua\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/neilbarua\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/jackmulloy\",\n",
            "      \"name\": \"Jack Mulloy\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/jackmulloy\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/rickfaulk\",\n",
            "      \"name\": \"Rick Faulk\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/rickfaulk\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/toufisaliba\",\n",
            "      \"name\": \"Toufi Saliba\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/toufisaliba\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/dpandey\",\n",
            "      \"name\": \"Dheeraj Pandey\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/dpandey\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/ralphdangelmaier\",\n",
            "      \"name\": \"Ralph Dangelmaier\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/ralphdangelmaier\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/linda-findley\",\n",
            "      \"name\": \"Linda Findley\",\n",
            "      \"title\": \"Global Consumer/Consumer Tech CEO ✦Ex Blue Apron, Etsy & Alibaba ✦P&Ls up to $3.2B ✦Driving Business Transformation & Scale ✦Board Director at Ralph Lauren & Styleseat\",\n",
            "      \"url_text\": \"https://www.linkedin.com/in/linda-findley\"\n",
            "    },\n",
            "    {\n",
            "      \"url\": \"https://www.linkedin.com/in/mjones\",\n",
            "      \"name\": \"Michael Jones\",\n",
            "      \"title\": null,\n",
            "      \"url_text\": \"https://www.linkedin.com/in/mjones\"\n",
            "    }\n",
            "  ],\n",
            "  \"default_avatar\": false,\n",
            "  \"memorialized_account\": false,\n",
            "  \"bio_links\": [\n",
            "    {\n",
            "      \"title\": \"Company Website\",\n",
            "      \"link\": \"http://www.microsoft.com/ceo\"\n",
            "    }\n",
            "  ],\n",
            "  \"timestamp\": \"2025-06-12T19:47:54.062Z\",\n",
            "  \"input\": {\n",
            "    \"url\": \"https://www.linkedin.com/in/satyanadella/\"\n",
            "  }\n",
            "}\n",
            "\n",
            "🤖 Running AI Agent Query...\n",
            "================================\u001b[1m Human Message \u001b[0m=================================\n",
            "\n",
            "\n",
            "    Scrape Amazon product data for https://www.amazon.com/dp/B0D2Q9397Y?th=1 \n",
            "    in New York (zipcode 10001) and summarize the key product details.\n",
            "    \n",
            "==================================\u001b[1m Ai Message \u001b[0m==================================\n",
            "Tool Calls:\n",
            "  brightdata_dataset (958c8809-ac5b-4eed-9e2a-851648ec0668)\n",
            " Call ID: 958c8809-ac5b-4eed-9e2a-851648ec0668\n",
            "  Args:\n",
            "    dataset_type: amazon_product\n",
            "    zipcode: 10001\n",
            "    url: https://www.amazon.com/dp/B0D2Q9397Y?th=1\n",
            "=================================\u001b[1m Tool Message \u001b[0m=================================\n",
            "Name: brightdata_dataset\n",
            "\n",
            "{\"title\": \"Stainless Steel Cable for Railing - 100FT 1/8\\\" T316 Wire Rope Cable for Deck Railings System Kit\", \"seller_name\": \"Cetwyn\", \"brand\": \"CELYND\", \"description\": \"Previous page Next page 1 7 X 7 STRANDS 2 1/8 Inch Diameter 3 STRONG TENSILE STRENGTH 4 Smooth Surface CELYND Deck Railing System Kit 100FT Steel Cable Add to Cart Cable Railing Hardware Add to Cart 150FT Steel Cable Add to Cart 100FT Steel Cable Add to Cart Cable Railing Hardware Buying Options 150FT Steel Cable Add to Cart 200FT Steel Cable Add to Cart Customer Reviews 4.6 out of 5 stars 54 4.6 out of 5 stars 29 4.8 out of 5 stars 17 4.7 out of 5 stars 69 4.4 out of 5 stars 30 4.7 out of 5 stars 69 4.9 out of 5 stars 26 Price $19.19$19.19 $45.99$45.99 $27.19$27.19 $39.99$39.99 — $49.99$49.99 $31.99$31.99 Size 100FT 80/100/120 pack 150FT 100FT 80/100/120 pack 150FT 200FT Diameter 1/8\\\" 1/8\\\" 1/8\\\" 1/8\\\" 1/8\\\" 1/8\\\" 1/8\\\" Material T316 Stainless Steel T316 Stainless Steel T316 Stainless Steel T316 Stainless Steel T316 Stainless Steel T316 Stainless Steel T316 Stainless Steel Maximum Load 1800LBS 1800LBS 1800LBS 1800LBS 1800LBS 1800LBS 1800LBS Color Silver Silver Silver Black Black Black Silver Cable Cutter ✔ ✘ ✔ ✔ ✘ ✔ ✔\", \"initial_price\": 23.99, \"currency\": \"USD\", \"availability\": \"In Stock\", \"reviews_count\": 54, \"categories\": [\"Tools & Home Improvement\", \"Building Supplies\", \"Building Materials\", \"Decking & Fencing\", \"Railings & Pickets\", \"Railings\"], \"parent_asin\": \"B0D2Q9397Y\", \"asin\": \"B0D2Q9397Y\", \"buybox_seller\": \"Cetwyn\", \"number_of_sellers\": 1, \"root_bs_rank\": null, \"answered_questions\": 0, \"domain\": \"https://www.amazon.com/\", \"images_count\": 7, \"url\": \"https://www.amazon.com/CELYND-Stainless-Steel-Cable-Railing/dp/B0D2Q9397Y?th=1&psc=1&language=en_US&currency=USD\", \"video_count\": 0, \"image_url\": \"https://m.media-amazon.com/images/I/81R4cTVp0eL._SL1500_.jpg\", \"rating\": 4.6, \"product_dimensions\": \"8.07 x 6.5 x 3.27 inches; 2.95 Pounds\", \"seller_id\": \"A30VX2OEZ3BEAX\", \"date_first_available\": \"April 26, 2024\", \"discount\": \"-20%\", \"model_number\": \"aircraft\", \"manufacturer\": \"CELYND\", \"department\": \"Tools & Home Improvement\", \"plus_content\": true, \"video\": false, \"top_review\": \"Great product and great deal.\", \"final_price_high\": null, \"final_price\": 19.19, \"variations\": [{\"name\": \"Silver 200FT\", \"asin\": \"B0D2QJBNVZ\", \"price\": 31.99, \"currency\": \"USD\", \"unit_price\": null, \"image\": null, \"color\": \"Silver\", \"size\": \"200FT\"}, {\"name\": \"Silver 100FT\", \"asin\": \"B0D2Q9397Y\", \"price\": 19.19, \"currency\": \"USD\", \"unit_price\": null, \"image\": null, \"color\": \"Silver\", \"size\": \"100FT\"}, {\"name\": \"Silver 600FT\", \"asin\": \"B0D2QHJTV2\", \"price\": 71.99, \"currency\": \"USD\", \"unit_price\": null, \"image\": null, \"color\": \"Silver\", \"size\": \"600FT\"}, {\"name\": \"Silver 500FT\", \"asin\": \"B0D2XYSJ8X\", \"price\": 55.99, \"currency\": \"USD\", \"unit_price\": null, \"image\": null, \"color\": \"Silver\", \"size\": \"500FT\"}, {\"name\": \"Silver 150FT\", \"asin\": \"B0D2NFWT4C\", \"price\": 27.19, \"currency\": \"USD\", \"unit_price\": null, \"image\": null, \"color\": \"Silver\", \"size\": \"150FT\"}, {\"name\": \"Silver 300FT\", \"asin\": \"B0D2NKZQKV\", \"price\": 39.99, \"currency\": \"USD\", \"unit_price\": null, \"image\": null, \"color\": \"Silver\", \"size\": \"300FT\"}, {\"name\": \"Silver 1000FT\", \"asin\": \"B0D2QMB8SH\", \"price\": 111.99, \"currency\": \"USD\", \"unit_price\": null, \"image\": null, \"color\": \"Silver\", \"size\": \"1000FT\"}], \"delivery\": [\"FREE delivery Tuesday, June 17 on orders shipped by Amazon over $35\", \"Or Prime members get FREE delivery Tomorrow, June 13. Order within 2 hrs 56 mins. Join Prime\", \"Arrives 2 days before Father's Day\"], \"features\": [\"Marine-Grade Material Crafted from premium T316 stainless steel, our wire rope boasts exceptional strength, durability, and resistance to rust and corrosion. Designed to withstand the harshest outdoor elements, this marine-grade stainless steel cable improve reliability for all your indoor and outdoor applications.\", \"Strong and Durable Our stainless steel wire rope made of 7 x 7 strands, braided together to form a sturdy and heavy duty construction. With a breaking strength of 1800 pounds and safe tension of 260 pounds, great for your various holding, strapping, and tensioning needs. It's ideal for industrial, house, marine, and DIY deck cable railing handrail systems.\", \"1/8 Stainless Steel Cable Kit 100 feet in length, 1/8 Inch diameter, stronger than other steel wire cables with 1/16 diameter. The surface of the steel cable is smooth, high polish without rough edges, easy to cut and crimping. The included cable cutter allows for effortless customization to your desired length, cuts smoothly without any sharp edges.\", \"Multipurpose Wire Rope Our 1/8 stainless steel cable is your versatile solution for a multitude of applications. Ideal for deck cable railing hardware handrail systems, also can use for zip line, aircraft cable, garden fencing, hanging string lights, hanging pictures, clothesline, shade sails, plants vines trellis, and other DIY projects in your garage, patio, garden, yard, backyard.\", \"Flexible and Easy to Use 1x 100ft steel wire rope, and 1x cutter to ease your job.\"], \"buybox_prices\": {\"final_price\": 19.19, \"initial_price\": 23.99, \"discount\": \"-20%\", \"unit_price\": null}, \"bought_past_month\": 100, \"is_available\": true, \"root_bs_category\": null, \"bs_category\": null, \"bs_rank\": null, \"badge\": null, \"subcategory_rank\": null, \"amazon_choice\": false, \"images\": [\"https://m.media-amazon.com/images/I/81R4cTVp0eL._SL1500_.jpg\", \"https://m.media-amazon.com/images/I/81+y4JtVFoL._SL1500_.jpg\", \"https://m.media-amazon.com/images/I/71BrOf4R+jL._SL1500_.jpg\", \"https://m.media-amazon.com/images/I/71BJBSS-2oL._SL1500_.jpg\", \"https://m.media-amazon.com/images/I/712-ZkBfKBL._SL1500_.jpg\", \"https://m.media-amazon.com/images/I/71ve5fgi85L._SL1500_.jpg\", \"https://m.media-amazon.com/images/I/81xiwiQMIOL._SL1500_.jpg\"], \"product_details\": [{\"type\": \"Package Dimensions\", \"value\": \"8.07 x 6.5 x 3.27 inches; 2.95 Pounds\"}, {\"type\": \"Item model number\", \"value\": \"aircraft\"}, {\"type\": \"Date First Available\", \"value\": \"April 26, 2024\"}, {\"type\": \"Manufacturer\", \"value\": \"CELYND\"}, {\"type\": \"ASIN\", \"value\": \"B0D2Q9397Y\"}, {\"type\": \"Country of Origin\", \"value\": \"China\"}, {\"type\": \"Customer Reviews\", \"value\": \"54\"}, {\"type\": \"Material\", \"value\": \"Stainless Steel\"}, {\"type\": \"Color\", \"value\": \"Silver\"}, {\"type\": \"Brand\", \"value\": \"CELYND\"}, {\"type\": \"Finish Type\", \"value\": \"Polished\"}, {\"type\": \"Recommended Uses For Product\", \"value\": \"Railing\"}], \"prices_breakdown\": {\"typical_price\": 23.99, \"list_price\": null, \"deal_type\": \"Limited time deal\"}, \"country_of_origin\": \"China\", \"from_the_brand\": [\"https://m.media-amazon.com/images/S/aplus-media-library-service-media/43a1a248-6be4-4580-b952-2d93991443df.__CR0,0,1464,625_PT0_SX1464_V1___.jpg\", \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/01c2a642-27fe-42f4-9b34-d6f9ed65ae07.__CR0,0,315,145_PT0_SX315_V1___.jpg\", \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/45b7b05f-7f65-497f-8c43-f412f3fd8143.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/61dIh1wuj6L.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/51G9hY5xUgL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/51aStNtmw5L.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/51Aj%2B9%2BOZOL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/51vDmnzq9IL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/51M5TfJA7hL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/41hdNeh0mZL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/41u1AlzJ3YL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/410Q7H5uuQL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/41I9xZZd3sL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/41N29jwHRDL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/41MYATYHciL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/I/41cHyN-FAiL.__AC_SR166,182___.jpg\", \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/1170374e-52b4-43c2-9991-8c391fd4ec66.__CR0,0,362,453_PT0_SX362_V1___.jpg\", \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/a1ebc124-3e18-4fb9-8a71-45b7a5803bba.__CR0,0,362,453_PT0_SX362_V1___.jpg\"], \"product_description\": [{\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/c2830672-d31b-4efd-98bf-05d7f78f5246.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/60ec89bd-c23a-4a6e-a9ed-0df9d21f4745.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/7f8a0f74-1ba8-4beb-893d-c0265f29ab33.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/d02d72a0-2930-4523-bae2-f4e819cde26d.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/6c59595d-3830-47e0-8724-7b83ad137bb2.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/dae42090-4bd0-4d4b-9d19-d98b58afd6e2.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/18765dcc-06cb-45a1-8270-bbe4072a90b1.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/cf354ac7-c0a2-4996-b12c-3cb7722eb564.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/a34cda7a-af13-4112-ab8d-85f2dc64c7ad.__CR0,0,1464,600_PT0_SX1464_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/a6059cf4-a986-48c5-bc57-b3cbfa6c3337.__CR0,0,200,225_PT0_SX200_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/44990efc-8bf4-40bd-a7d9-6ba4340666e7.__CR0,0,200,225_PT0_SX200_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/7904a0d4-872e-45db-9784-1765081f1f12.__CR0,0,200,225_PT0_SX200_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/7687dc62-2f73-441c-9103-5d1d7302a200.__CR0,0,200,225_PT0_SX200_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/c0ab7cd0-8122-49f8-9225-797200521b59.__CR0,0,200,225_PT0_SX200_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/073f2876-a02a-42e7-a953-1581f52b0253.__CR0,0,200,225_PT0_SX200_V1___.jpg\", \"type\": \"image\"}, {\"url\": \"https://m.media-amazon.com/images/S/aplus-media-library-service-media/70653515-767d-494d-84f9-2a357f9e8053.__CR0,0,200,225_PT0_SX200_V1___.jpg\", \"type\": \"image\"}], \"seller_url\": \"https://www.amazon.com/sp?ie=UTF8&seller=A30VX2OEZ3BEAX&asin=B0D2Q9397Y\", \"customer_says\": \"Customers find the cable's quality positive, with one mentioning it comes with an excellent cutter. They also appreciate its strength.\", \"sustainability_features\": null, \"climate_pledge_friendly\": false, \"videos\": null, \"other_sellers_prices\": null, \"downloadable_videos\": null, \"editorial_reviews\": null, \"about_the_author\": null, \"zipcode\": \"10001\", \"sponsered\": true, \"store_url\": \"https://www.amazon.com/stores/CELYND/page/5D4AC5C3-4E41-4EA7-B425-AD81914B616C?is_byline_deeplink=true&deeplink=D14DD319-9D6B-4B6D-97FD-3114AA3610F8&redirect_store_id=5D4AC5C3-4E41-4EA7-B425-AD81914B616C&lp_asin=B0D2Q9397Y&ref_=ast_bln&store_ref=bl_ast_dp_brandLogo_sto\", \"ships_from\": \"Amazon\", \"customers_say\": {\"text\": \"Customers find the cable's quality positive, with one mentioning it comes with an excellent cutter. They also appreciate its strength.\", \"keywords\": {\"positive\": [\"Cable quality\", \"Strength\"], \"negative\": null, \"mixed\": null}}, \"max_quantity_available\": 30, \"variations_values\": [{\"variant name\": \"Color\", \"values\": [\"Silver\"]}, {\"variant name\": \"Size\", \"values\": [\"100FT\", \"150FT\", \"200FT\", \"300FT\", \"500FT\", \"600FT\", \"1000FT\"]}], \"timestamp\": \"2025-06-12T19:48:16.469Z\", \"input\": {\"url\": \"https://www.amazon.com/dp/B0D2Q9397Y?th=1\", \"zipcode\": \"10001\", \"asin\": \"\", \"language\": \"\"}}\n",
            "==================================\u001b[1m Ai Message \u001b[0m==================================\n",
            "\n",
            "The product is a 100FT 1/8\" T316 stainless steel wire rope cable for deck railings from CELYND, currently priced at $19.19 (originally $23.99). It is marine-grade, rust and corrosion-resistant, with a breaking strength of 1800 pounds. It comes with a cable cutter for easy customization. Customers have generally positive feedback, appreciating its quality and strength. It's available for free delivery as early as tomorrow for Prime members.\n"
          ]
        }
      ]
    }
  ],
  "metadata": {
    "language_info": {
      "name": "python"
    },
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}